package com.originskyseed.platform.user.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.Anchor;
import com.originskyseed.platform.user.model.TaskSelectAnchorVO;
import com.originskyseed.platform.user.model.UserInfo;

/**
 * 主播信息Service接口类（OSI_ANCHOR）
 *
 * @author
 */
public interface IAnchorService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(Anchor record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(Anchor record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(Anchor record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(Anchor record) throws Exception;


	/**
	 * 查询记录
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Anchor selectByAnchorId(String id) throws Exception;
	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Anchor selectByAnchorId(String tenantCode,String id) throws Exception;

	/**
	 * 查询记录(租户模式)
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Anchor selectByAnchorIdTenantCode(String id, String tenantCode) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<Anchor> selectList(Anchor record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<Anchor> selectListByPage(Map<String, Object> params, BasePage<Anchor> page) throws Exception;

	/**
	 * 主播资料卡分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public BasePage<Anchor> selectAnchorInFoListByPage(Map<String, Object> params, BasePage<Anchor> page, UserInfo userInfo) throws Exception;


	/**
	 * 获取能查看主播信息
	 * @param userInfo
	 * @return
	 * @throws Exception
	 */
	public List<String> getAnchorId(UserInfo userInfo) throws Exception;
	/**
	 *  分页查询 主播艺人薪资结算列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<Anchor> selectAnchorSalarySettlementByPage(Map<String, Object> params, BasePage<Anchor> page) throws Exception;


	/**
	 *  查询 主播艺人薪资结算列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<Anchor> selectAnchorSalarySettlementList(Map<String, Object> params) throws Exception;


	/**
	 * 主动查询主播列表信息
	 * 
	 * @param anchorIds
	 * @return
	 * @throws Exception
	 */
	public List<Anchor> getAnchorList(String anchorIds) throws Exception;

	/**
	 * 选择主播信息_分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<TaskSelectAnchorVO> selectMaintainAnchorListByPage(Map<String, Object> params, BasePage<TaskSelectAnchorVO> page) throws Exception;

	/**
	 * 导出Excel
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<Anchor> selectListToExcel(Map<String, Object> params) throws Exception;

	/**
	 * 主播广场_全平台主播信息_分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public BasePage<Anchor> allPlatformAnchorListByPage(Map<String, Object> params, BasePage<Anchor> page, UserInfo userInfo) throws Exception;

	/**
	 * 主播广场_我收藏的主播信息_分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public BasePage<Anchor> myCollectAnchorListByPage(Map<String, Object> params, BasePage<Anchor> page) throws Exception;

	/**
	 * 查询主播id是否存在
	 *
	 * @param anchorIds
	 * @return
	 * @throws Exception
	 */
	public List<String> selectAnchorIds(List<String> anchorIds) throws Exception;

	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatchAnchor(List<Anchor> list) throws Exception;

	/**
	 * 根据familyId查询记录
	 *
	 * @param familyId
	 * @return
	 * @throws Exception
	 */
	public List<Anchor> selectByFamilyId(String familyId) throws Exception;

	/**
	 * 统计主播观看人数和消费人数
	 * @throws Exception
	 */
	public void updateAnchorViewLiveAndConsume(String tenantCode)throws Exception;
}
